<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <my-cpn>
            <span slot="left">菜单</span>
            <input slot="center" type="text">
            <span slot="right">登录</span>
        </my-cpn>


        <my-cpn>
            <span slot="left">返回</span>
            <input slot="center" type="text">
            <span slot="right">...</span>
        </my-cpn>
        
    </div>
    <script src="../js/vue.js"></script>
    <template id="myCpn">
        <div>
            <slot name="left"></slot>
            <slot name="center"></slot>
            <slot name="right"></slot>
        </div>
    </template>
    <script>
        const app = new Vue({
            el:'#app',
            data(){
                return {

                }
            },
            components:{
                'my-cpn':{
                    template:'#myCpn',
                }
            }
        })
    </script>
</body>
</html>